<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>
<script type="text/javascript" src="js/bootstrap-popover.js"></script>
<script type="text/javascript" src="js/bootstrap-tooltip.js"></script>
<script type="text/javascript" src="js/bootstrap-scrollspy.js"></script>
<script type="text/javascript" src="js/bootstrap-typeahead.js"></script>
<title>My JSP 'MyJsp.jsp' starting page</title>
<style type="text/css">
body{
margin-left: 20%;
}
</style>
</head>
<body>
	<input class="span3" type="text" data-provide="typeahead"
		style="margin: 0 auto;">相应的值
	<div class="well">
		<a id="popupbutton" data-original-title="A Title" href="#"
			class="btn btn-danger" rel="popover"
			data-content="And here's some amazing content. It's very engaging. right?">hover
			for popover</a>
	</div>
	<script type="text/javascript">
		//$(".span3").attr("data-source",['Alabama','Alaska','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','Florida','Georgia','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada',
		//                               'New Hampshire','New Jersey','New Mexico','New York','North Dakota','Ohio','Oklahoma','Oregon','Pennsylvania','Rhode Island','South Carolina','South Dakota','Tennessee','Texas',
		//                      		'Utah','Vermont','Virginia','Washington','West Virginia','Wisconsin','Wyoming']);
	</script>
	
	<script type="text/javascript">
		$(function() {
			/*$("#popupbutton").click(function(){
				alert("111");
				window.location.href = "getPatient.action";
				//source : "getPatient.action",//[{label:"aaa",value:"aaa1"},{label:"bbb",value:"bbbb2"}],
				
			});*/
			$(".span3").autocomplete({
				
				source : "getPatient.action" ,
					//[{label:"张三三,QWQWE,0000010",value:"rose,QWQWE,2012-02-02,0000010"},{label:"李思思,null,null",value:"jack,null,null,null"}],
				select : function(e, ui) {
					
					var vals = ui.item.value.split(",");
					alert(ui.item.value);
					return false;
				}
			});
			$(".span3")._keyEvent = function() {};
		});
		//$('.span3').typeahead({"source":['abc','adde','Azz','def']});
		//$('#popupbutton').popover();
		//$('#popupbutton').popover("show");
		/*$("#btn").click(function() {
		 var str="";
		 $("input[type=radio]").each(function(i, obj) {
		 if($(this).attr("checked")=="checked"){
		 alert("111");
		 alert($(this).val());
		 str=str+($(this).val()+",");
		 alert("str的值："+str);
		 }
		 //str += obj.value;
		 });
		 alert(str);
		 });*/
		/*$("#btn").click(function() {
			var radios = $("input[checked='checked']");
			var num = 0;
			radios.each(function() {

				num += parseInt(this.value);
			});
			alert(num);
		});*/
		/*
		$("input[type='button']").click(function(){
			alert($("input[type='radio']").attr("checked"));
			alert($("input[type='radio']").val());
			
		});*/

		//$('.typeahead').typeahead();
	</script>



	<%--<input type="radio" value="1" />a1
	<br />
	<input type="radio" value="2" />a2
	<br />
	<input type="radio" value="3" />a3
	<br />
	<input type="radio" value="4" />a4
	<br />
	<input id="btn" type="button" value="按钮" />
	<br />


--%>
</body>
</html>
